var getStructureTypes = function () {
  const app = getApp();
  return new Promise((resolve, reject) => {
    wx.request({
      url: app.globalData.siteUrl + '/dic/queryByTypeCode',
      method: 'post',
      header: {
        "X-Token": app.globalData.openId,
        "Content-Type": "application/x-www-form-urlencoded",
      },
      data: {
        "typeCode": "structure_type_code"
      },
      success: function (res) {

        if (res.data.model && res.data.model.length) {
          resolve(res.data.model);
        }
      },
      fail: reject
    });
  });
};

module.exports = {
  getStructureTypes: getStructureTypes
}

